#include "warnthread.h"
#include <QSound>


extern bool warnplay;

WarnThread::WarnThread(QObject *parent) : QThread(parent)
{

}

WarnThread::~WarnThread()
{

}

void WarnThread::run()
{
    while(warnplay)
    {
        QSound *sound = new QSound(":/new/prefix1/warn2.wav", this); //构建对
        sound->play();//播放
       // Sleep(10000);
    }
}
